#include <windows.h>

/**********************************************************************************
	ADT yang khusus digunakan untuk membntu menggambar pada cmd windows
**********************************************************************************/ 

// GLOBAL VAR
HANDLE CONSOLE_HANDLE;

// COLOR DEFINITIONS
#define FW 		FOREGROUND_RED|FOREGROUND_GREEN |FOREGROUND_BLUE
#define FR 		FOREGROUND_RED
#define FG 		FOREGROUND_GREEN
#define FB 		FOREGROUND_BLUE
#define FY 		FOREGROUND_RED|FOREGROUND_GREEN
#define FC 		FOREGROUND_GREEN|FOREGROUND_BLUE
#define FM 		FOREGROUND_BLUE|FOREGROUND_RED 
#define FWI 	FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY
#define FRI 	FOREGROUND_RED|FOREGROUND_INTENSITY
#define FGI 	FOREGROUND_GREEN|FOREGROUND_INTENSITY
#define FBI 	FOREGROUND_BLUE|FOREGROUND_INTENSITY
#define FYI 	FOREGROUND_RED |FOREGROUND_GREEN|FOREGROUND_INTENSITY
#define FCI 	FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY
#define FMI 	FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_INTENSITY 
#define FNULL 	0
 
#define BW 		BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE
#define BR 		BACKGROUND_RED
#define BG 		BACKGROUND_GREEN
#define BB 		BACKGROUND_BLUE
#define BY 		BACKGROUND_RED|BACKGROUND_GREEN
#define BC 		BACKGROUND_GREEN|BACKGROUND_BLUE
#define BM 		BACKGROUND_BLUE|BACKGROUND_RED 
#define BWI 	BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_BLUE|BACKGROUND_INTENSITY
#define BRI 	BACKGROUND_RED|BACKGROUND_INTENSITY
#define BGI 	BACKGROUND_GREEN|BACKGROUND_INTENSITY
#define BBI 	BACKGROUND_BLUE|BACKGROUND_INTENSITY
#define BYI 	BACKGROUND_RED|BACKGROUND_GREEN|BACKGROUND_INTENSITY
#define BCI 	BACKGROUND_GREEN|BACKGROUND_BLUE|BACKGROUND_INTENSITY
#define BMI 	BACKGROUND_BLUE|BACKGROUND_RED|BACKGROUND_INTENSITY 
#define BNULL 	0


void InitGraphics();
/**********************************************************************************
	Menginisialisasi grafik - harus dipanggil saat inisialisasi
**********************************************************************************/ 

void SetColor(WORD color);
/**********************************************************************************
	MEngubah warna
**********************************************************************************/ 

void SetWindowSize(DWORD length, DWORD height);
/**********************************************************************************
	Mengubah ukuran window
**********************************************************************************/ 

void FillChar2(TCHAR c, DWORD sx, DWORD sy, DWORD ex, DWORD ey);
/**********************************************************************************
	Print c sepanjang koordinat <sx,sy> sampai <ex,ey> ( berupa kotak )
**********************************************************************************/ 

void SetPointerPos(DWORD x, DWORD y);
/**********************************************************************************
	Mengubah posisi pointer menjadi <x,y>
**********************************************************************************/ 

void DrawBox(DWORD x, DWORD y, DWORD w, DWORD h, WORD color);
/**********************************************************************************
	Mengganbar kotak kosong di posisi <x,y> degan lebar w, tinggi h, dan warna color
**********************************************************************************/ 

void DrawChar(TCHAR c, DWORD x, DWORD y);
/**********************************************************************************
	Print c pada koordinat <x,y>
**********************************************************************************/ 

